(global.webpackJsonp = global.webpackJsonp || []).push([ [ "subpages/pages/integral/integral-info" ], {
    "119a": function(t, n, o) {
        o.r(n);
        var e = o("fe72"), i = o.n(e);
        for (var a in e) "default" !== a && function(t) {
            o.d(n, t, function() {
                return e[t];
            });
        }(a);
        n.default = i.a;
    },
    3134: function(t, n, o) {
        (function(t) {
            o("98af"), e(o("66fd"));
            var n = e(o("46a0"));
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = o, t(n.default);
        }).call(this, o("543d").createPage);
    },
    "46a0": function(t, n, o) {
        o.r(n);
        var e = o("61a2"), i = o("119a");
        for (var a in i) "default" !== a && function(t) {
            o.d(n, t, function() {
                return i[t];
            });
        }(a);
        var s = o("f0c5"), c = Object(s.a)(i.default, e.b, e.c, !1, null, "22a9f2fc", null, !1, e.a, void 0);
        n.default = c.exports;
    },
    "61a2": function(t, n, o) {
        o.d(n, "b", function() {
            return e;
        }), o.d(n, "c", function() {
            return i;
        }), o.d(n, "a", function() {});
        var e = function() {
            var t = this, n = (t.$createElement, t._self._c, 0 == t.type ? Number(t.info.money) : 1), o = 0 == t.type ? 0 == Number(t.info.counts) ? 1 : Number(t.info.counts) : 1, e = 0 == t.type ? Number(t.info.money) : 1, i = 0 == t.type ? 0 == Number(t.info.counts) ? 1 : Number(t.info.counts) : 1;
            t.$mp.data = Object.assign({}, {
                $root: {
                    m0: n,
                    m1: o,
                    m2: e,
                    m3: i
                }
            });
        }, i = [];
    },
    fe72: function(t, n, o) {
        (function(t) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var e = {
                components: {
                    zbPayModal: function() {
                        o.e("components/zb-pay/zb-pay").then(function() {
                            return resolve(o("26cd"));
                        }.bind(null, o)).catch(o.oe);
                    }
                },
                mixins: [ o("ebe2").checkLogin ],
                data: function() {
                    return {
                        points: 0,
                        rich_text: "",
                        info: {},
                        form: {},
                        type: 2,
                        couponList: [ {
                            title: "寄快递积分",
                            content: "消费1元积1分",
                            condition: "寄快递",
                            geted: !1
                        }, {
                            title: "分享积分",
                            content: "邀请一个新用户,积1分",
                            condition: "去分享",
                            geted: !1
                        }, {
                            title: "关注积分",
                            content: "关注服务号积20分",
                            condition: "去关注",
                            geted: !0
                        }, {
                            title: "签到积分",
                            content: "签到1次积1分,连续签到有惊喜",
                            condition: "去签到",
                            geted: !1
                        } ]
                    };
                },
                onLoad: function(t) {
                    this.info = this.$store.state.integralInfo, this.type = this.info.type, this.rich_text = this.info.remark;
                    var n = this.$db.get("userInfo");
                    n && n.points && (this.points = n.points);
                },
                methods: {
                    show_order: function() {
                        0 == this.type ? this.$refs.zbPayModule.open(this.info.buy_money, "已下单") : 1 == this.type && this.pointPay();
                    },
                    pointPay: function() {
                        var n = this;
                        this.$db.get("userToken") ? this.info.cash_points > this.points ? t.showToast({
                            title: "您当前积分不足!",
                            duration: 2e3,
                            icon: "none"
                        }) : t.showModal({
                            title: "提示",
                            content: "确定使用" + n.info.cash_points + "积分兑换吗?",
                            confirmText: "确定",
                            cancelText: "取消",
                            success: function(o) {
                                o.confirm && n.$api.cashCouponApi({
                                    promotion_id: n.info.id
                                }, function(o) {
                                    n.$common.errorToShow(o.msg, function() {
                                        1 == o.code && (n.$api.getUserInfoApi({
                                            user_id: n.$db.get("userId")
                                        }, function(t) {
                                            if ("1" == t.code) {
                                                var o = t.data;
                                                n.$db.set("userInfo", o), n.points = o.points;
                                            }
                                        }), t.navigateTo({
                                            url: "/pages/member/coupon/coupon?status=1"
                                        }));
                                    });
                                });
                            }
                        }) : this.checkIsLogin();
                    },
                    changePay: function(n) {
                        var o = this;
                        this.form.paytype = n, this.form.promotion_id = this.info.id, this.form.platform = "", 
                        this.form.platform = "miniapp", this.is_nocommission && (this.form.domain = "m"), 
                        this.$api.buyCouponApi(this.form, function(n) {
                            if ("1" == n.code) if ("wechat" === o.form.paytype) {
                                var e = n.data, i = e.timeStamp, a = e.nonceStr, s = e.signType, c = e.paySign;
                                t.requestPayment({
                                    provider: "wxpay",
                                    timeStamp: i,
                                    nonceStr: a,
                                    package: n.data.package,
                                    signType: s,
                                    paySign: c,
                                    success: function(n) {
                                        o.$common.successToShow("购买成功", function() {
                                            t.navigateTo({
                                                url: "/pages/member/coupon/coupon?status=1"
                                            });
                                        });
                                    }
                                });
                            } else o.$common.successToShow(n.msg, function() {
                                t.navigateTo({
                                    url: "/pages/member/coupon/coupon?status=1"
                                });
                            }); else o.$common.errorToShow(n.msg);
                        }, function() {});
                    }
                }
            };
            n.default = e;
        }).call(this, o("543d").default);
    }
}, [ [ "3134", "common/runtime", "common/vendor" ] ] ]);